{
  LW Dialog -- LightWave Standard Dialogs

  LightWave makes some of its more common requests from the user using
  standard dialogs.  These dialogs (or "requesters") are used for getting
  files and paths for saving and loading, and for getting color choices.
  By default, the standard system dialogs are used, but these can be
  overridden by plug-ins of the right class.

  Based on lwdialog.h which is:
  Copyright 1999, NewTek, Inc.
}

{
  Copyright 2012, Jameel Halabi

  This unit is part of the BlaiseWave wrapper,
  which is licensed under the BSD 2-Clause license (see licenses/license.txt).
}


unit LW_Dialog;

{$mode objfpc}{$H+}

interface

const
  LWFILEREQ_CLASS   = 'FileRequester';
  LWFILEREQ_VERSION = 3;

  FREQ_LOAD      = 1;
  FREQ_SAVE      = 2;
  FREQ_DIRECTORY = 3;
  FREQ_MULTILOAD = 4;

  LWCOLORPICK_CLASS   = 'ColorPicker';
  // This version means your need to supply your own color correction.
  LWCOLORPICK_VERSION = 5;

type
  {
    File dialogs can be configured by servers of this class.
  }
  PLWFileReqLocal = ^TLWFileReqLocal;

  TLWFileReqLocal = record
    ReqType:  Integer;
    Result:   Integer;
    Title:    PChar;
    FileType: PChar;
    Path:     PChar;
    BaseName: PChar;
    FullName: PChar;
    BufLen:   Integer;

    PickName: function: Integer;
  end;

  {
    Color dialogs can be configured by servers of this class.
  }
  TLWHotColorFunc = procedure
    (Data:    Pointer;
     R, G, B: Single);

  PLWColorPickLocal = ^TLWColorPickLocal;

  TLWColorPickLocal = record
    Result:           Integer;
    Title:            PChar;
    Red, Green, Blue: Single;
    Data:             Pointer;

    HotFunc: TLWHotColorFunc;
  end;

implementation

end.

